-- prieste
-- created by panyl
-- 祭司

return {
    apply = function(cardId)
        local  args = TarotM.query(cardId, "args") or {};
        local dbase = TarotM.query(cardId, "dbase") or {};
        local condition = args["condition"];
        local bonus = args["bonus"];


        if condition then
            -- 附加祭司状态
            CombatStatusM.applyStatus(ME.user, "prieste", condition);
            
            -- 抛事件
            EventMgr.fire(event.ADD_PROP, {["effect_id"] = dbase.effect_id, });
        end

        if type(bonus) == 'table' and #bonus > 0 then
            BonusM.doBonus(bonus, "tarot_bonus");
        end
    end,
};
